package cn.tedu._03vehicle.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;


@Data
public class UserRegParam {
    @Schema(description = "用户名",required=true,example = "杰克吉伦哈尔")
//    @NotNull(message = "用户名不能为空值")
//    @NotEmpty(message = "用户名不能为空值和空值空字符串")
//    @NotBlank(message = "用户名不能为空值空字符串和空白串")
//    @Size(min=6,max=10,message="用户名长度在6-10之间")
    //正则表达式只会看字符就行 写用ai写
    @Pattern(regexp ="^(?:[a-zA-Z]{1,14}|[\\u4e00-\\u9fa5]{1,7})$",message = "用户名最长14个英文字母或者7个中文")
    private String username;
    @Schema(description = "密码",required=true,example = "12345")
    @Pattern(regexp ="^(?!.*[\\u4e00-\\u9fa5\\s])(?=.*[a-zA-Z])(?=.*[\\d\\p{P}\\p{S}]|.*[a-zA-Z].*[\\p{P}\\p{S}])[\\w\\p{P}\\p{S}]{8,14}$|^(?!.*[\\u4e00-\\u9fa5\\s])(?=.*\\d)(?=.*[\\p{P}\\p{S}])[\\w\\p{P}\\p{S}]{8,14}$",message = "密码长度为8-14个字符 字母/数字以及标点符号至少包含两种，不能有空格中文")
    private String password;
    @Schema(description = "电子邮件",required=true,example = "zzd@qq.com")
    @Email(message="邮箱格式错误")
    private String email;
    @Schema(description = "手机号码",required=true,example = "136000000")
    private String phone;







}
